/*
 * @Author: 千锋爱佛僧
 * @公众号: 大前端私房菜
 * @Slogan: 千锋精品教程，好学得不像实力派！
 */
import { useAppSelector } from "@/store/hook";
import * as React from "react";

export interface IAuthProps {
  children: React.ReactNode;
}

export default function Auth(props: IAuthProps) {
  const { userInfo } = useAppSelector((state) => state.user);
  return <>{userInfo!.role.roleName == "超级管理员" ? props.children : ""}</>;
}
